n=int(input())
numbers=list(map(int,input().split()))

result=0
s={}
for number in numbers:
    if s.get(number) is None:
        s[number]=1
        s[-number]=1
    else:
        result+=1

print(result)